<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Twitter</title>
        <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script src="Lib/jsrender.js" type="text/javascript"></script>
		<script src="Lib/jquery.views.js" type="text/javascript"></script>
		 <script src="http://platform.twitter.com/anywhere.js?id=NIX&v=1" type="text/javascript"></script>
		 <script src="NLG/enlg.js"></script>
		 <script src="Parser/SFTweetflow.js"></script>
		 <script src="Parser/SRTweetflow.js"></script>
		 <script src="Parser/TweetflowParser.js"></script>
		 <script src="config.js"></script>
        <script id="linkify">
        	if(!String.linkify) {
			    String.prototype.linkify = function() {
			
			        // http://, https://, ftp://
			        var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
			
			        // www. sans http:// or https://
			        var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
			
			        // Email addresses *** here I've changed the expression ***
			        var emailAddressPattern = /(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;
			
			        return this
			            .replace(urlPattern, '<a target="_blank" href="$&">$&</a>')
			            .replace(pseudoUrlPattern, '$1<a target="_blank" href="http://$2">$2</a>')
			            .replace(emailAddressPattern, '<a target="_blank" href="mailto:$1">$1</a>');
			    };
			}
        </script>
        
        <link href="style.css" rel="stylesheet" type="text/css"></link>
        
    </head>
    <body>
    
    	<script id="tweetTemplate" type="text/x-jquery-tmpl">
    		{{#if tweetflow}}
    			<div class="tweetflow" align="center"> 
    		{{else}}
    			<div class="tweet" align="center"> 
    		{{/if}}
    		
    			<div class="profile_pic">
   				   {{#if retweeted_status}}
    					<img src="{{=retweeted_status.user.profile_image_url}}" />
    					</div>
    					<div>
    						<div class="user">{{=retweeted_status.user.screen_name}}</div> 
    				{{else}}
    				    {{#if user && user.profile_image_url}}
    						<img src="{{=user.profile_image_url}}" />
    					{{/if}}
    					</div>
    					<div>
    					{{#if user && user.screen_name}}
    						<div class="user">{{=user.screen_name}}</div>
    					{{/if}} 
  				    {{/if}} 
    				 <div class="time">@ {{=created_at}}</div>
    				 
    				 {{#if tweetflowTranslation}}
    				 	<div class="tweetflowtext">{{=tweetflowTranslation}}</div>
    				 	<div class="hiddentweettext">{{=text}}</div>
    				 {{else}}
    				 	<div class="tweettext">{{=text}}</div>
    				 {{/if}}
    				 
    			</div>
    			<div class="retweeted_by">
    				{{#if retweeted_status}}
    					retweeted by @{{=user.screen_name}}
    				{{/if}}
    			</div>
    		</div>
    	</script>
    	
    	<script src="tweetflower.js" type="text/javascript"></script>
    	<script type="text/javascript">
    	
    	
    	   var tweetManager = new Tweetflower();
        	
        </script>
    	
        <h1>TweetFlower</h1>
        <div id="tweetlist" class="tweetlist">
        	<div class="statusbar" id="statusbar_top">Loading newer Tweets...</div>
        	<div id="tweets" class="tweets"></div>
        	<div class="statusbar" id="statusbar_bottom">Loading older Tweets...</div>	
        </div>
        
        <div id="infopanel" class="infopanel">
        	<p class="user">Original Tweet:</p>
        	<div id="originaltext" class="originaltext">dummy</div>
        </div>
    </body>
</html>
